package cn.liuhuan1.blogsModel.controller;

import cn.liuhuan1.entity.ReturnResult;
import cn.liuhuan1.webModelBean.api.CategoryImp;
import cn.liuhuan1.webModelBean.vo.CategoryVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Auther: liuhuan
 * @Date: 2021/2/22 - 02 - 22 - 15:12
 * @Description:
 * @version: 1.0
 */
@Controller
@RequestMapping("/afterUser/category")
public class CategoryController {


    @Autowired
    private CategoryImp categoryImp;

    @RequestMapping(value = "/getCategory",method = RequestMethod.GET)
    @ResponseBody
    public ReturnResult getCategory(){
        List<CategoryVo> getcategro = categoryImp.getcategro();
        return ReturnResult.succes(getcategro);
    }

}
